package com.iqiyi.pps.epg.api.server.impl;

import com.iqiyi.pps.epg.api.server.iservice.StatisticApiService;
import com.iqiyi.pps.epg.api.server.proxy.StatisticProxy;
import com.iqiyi.pps.epg.api.utils.CrossDataLocalPool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.ws.rs.core.Response;

/**
 * Created by karkarrotxu on 2017/6/28.
 */
@Service("statisticApiServiceImpl")
public class StatisticApiServiceImpl extends ApiServiceImpl implements StatisticApiService {


    @Autowired
    private StatisticProxy elementProxy;

    @Override
    public String postOcrNewData(String data) {
        CrossDataLocalPool.set(getCrossData());
        return elementProxy.postOcrNewData(data);
    }

    @Override
    public String getOcrNewDataList(Integer pageSize, Integer pageNo, String data) {
        CrossDataLocalPool.set(getCrossData());
        return elementProxy.getOcrNewDataList(pageSize, pageNo, data);
    }

    @Override
    public String getOcrAvgAndFullPercent(String token, String data) {
        CrossDataLocalPool.set(getCrossData());
        return elementProxy.getOcrAvgAndFullPercent(token, data);
    }

    @Override
    public Response getOcrExcel(String paramsObj ,Integer needPic) {
        return elementProxy.getOcrExcel(paramsObj,needPic);
    }

    @Override
    public String postAutoNewData( String data) {
        CrossDataLocalPool.set(getCrossData());
        return elementProxy.postAutoNewData(data);
    }

    @Override
    public String getAutoNewDataList( Integer pageSize,  Integer pageNo,  String paramsObj) {
        CrossDataLocalPool.set(getCrossData());
        return elementProxy.getAutoNewDataList(pageSize, pageNo, paramsObj);
    }

    @Override
    public String getAutoDataRate( String token,  String paramsObj) {
        CrossDataLocalPool.set(getCrossData());
        return elementProxy.getAutoDataRate(token,  paramsObj);
    }

    @Override
    public Response getAutoExcel(String paramsObj, Integer needPic) {
        return elementProxy.getAutoExcel(paramsObj,needPic);
    }
}
